import json

# 示例列表
my_list = [1, 2, 3, 4, 5]

# 保存列表到文件
with open('my_list.json', 'w', encoding='utf-8') as f:
    json.dump(my_list, f)

# 从文件加载列表
with open('my_list.json', 'r', encoding='utf-8') as f:
    loaded_list = json.load(f)

print(loaded_list)
